WaterMarkComponent
WaterMarkComponent API
- WaterMarkComponent.setWaterMarkVisible
- Parameters
- visible: boolean
- - A boolean indicating whether the watermark should be visible or not.
- Returns
- void
WaterMarkComponent.setWaterMarkVisible(visible: boolean): void
Sets the visibility of the watermark component.
- WaterMarkComponent.setWaterMarkData
- Parameters
- watermarkData: WaterMarkData
- - The data to be used as watermark.
- Returns
- void
WaterMarkComponent.setWaterMarkData(watermarkData: WaterMarkData): void
Sets the watermark data to be used in the canvas.
- WaterMarkComponent.getWaterMarkData
- Returns
- WaterMarkData
WaterMarkComponent.getWaterMarkData(): WaterMarkData
Returns the water mark data object if it exists, otherwise returns an empty object.
- WaterMarkComponent.setWaterMarkConfig
- Parameters
- watermarkConfig: ChartConfigComponentsWaterMark
- - The configuration object for the watermark.
- Returns
- void
WaterMarkComponent.setWaterMarkConfig(watermarkConfig: ChartConfigComponentsWaterMark): void
Sets the watermark configuration for the chart.
- WaterMarkComponent.setLogoImage
- Parameters
- img: CanvasImageSource
- - The image to be used as a watermark.
- Returns
- void
WaterMarkComponent.setLogoImage(img: CanvasImageSource): void
Sets the logo image to be used as a watermark.
- WaterMarkComponent.recalculateTextSize
- Parameters
- chartWidth: number
- - The width of the chart.
- chartHeight: number
- - The height of the chart.
- Returns
- { firstRowFontSize: number; secondRowFontSize: number; thirdRowFontSize: number; visible: boolean; position: WaterMarkPositionType; offsetX: number; offsetY: number; ... 5 more ...; thirdRowBottomPadding: number; }
WaterMarkComponent.recalculateTextSize(chartWidth: number, chartHeight: number): { firstRowFontSize: number; secondRowFontSize: number; thirdRowFontSize: number; visible: boolean; position: WaterMarkPositionType; offsetX: number; offsetY: number; ... 5 more ...; thirdRowBottomPadding: number; }
Recalculates the watermark text size based on the chart's width and height.